package com.gopay.common.domain.bank.route.po;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Version;

import com.gopay.common.domain.BaseEntity;

/**
 * 规则明细表 zhg.zhang 2016年9月22日 www.gopay.com.cn Inc.All rights reserved.
 */

@Entity
@Table(name = "bis_special_route_channel_dtl")
public class BisSpecialRouteChannelDtl extends BaseEntity {

	
	private static final long serialVersionUID = 4342439344488494247L;
	/** 规则明细ID **/
	private Integer channelId;
	/** 规则ID **/
	private Integer ruleId;
	/** 渠道 **/
	private String channelCode;
	/** 0逻辑删除，1正常 **/
	private Integer isDelete;
	/** 表达式开始金额 **/
	private BigDecimal startExp;
	/** 表达式结束 **/
	private BigDecimal endExp;

	private Integer sort;
	
	private Integer version;

	private Date createdTs;

	@Id
	@SequenceGenerator(name = "bisouteChannelDtlSeq", sequenceName = "bis_special_route_channel_seq",allocationSize=1)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "bisouteChannelDtlSeq")
	@Column(name = "channel_id", unique = true, nullable = false)
	public Integer getChannelId() {
		return channelId;
	}

	public void setChannelId(Integer channelId) {
		this.channelId = channelId;
	}

	@Column(name = "rule_id")
	public Integer getRuleId() {
		return ruleId;
	}

	public void setRuleId(Integer ruleId) {
		this.ruleId = ruleId;
	}

	@Column(name = "channel_code")
	public String getChannelCode() {
		return channelCode;
	}

	public void setChannelCode(String channelCode) {
		this.channelCode = channelCode;
	}

	@Column(name = "is_delete")
	public Integer getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}

	@Column(name = "start_exp")
	public BigDecimal getStartExp() {
		return startExp;
	}

	public void setStartExp(BigDecimal startExp) {
		this.startExp = startExp;
	}

	@Column(name = "end_exp")
	public BigDecimal getEndExp() {
		return endExp;
	}

	public void setEndExp(BigDecimal endExp) {
		this.endExp = endExp;
	}

	@Version
	@Column(name = "VERSION")
	public Integer getVersion() {
		return version;
	}

	public void setVersion(Integer version) {
		this.version = version;
	}

	@Column(name = "CREATE_TM", nullable = false)
	public Date getCreatedTs() {
		return createdTs;
	}

	public void setCreatedTs(Date createdTs) {
		this.createdTs = createdTs;
	}
	@Column(name = "SORT")
	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}
}
